<script lang="ts" setup>
import { ref } from 'vue'
import type { TabsInstance } from 'element-plus'

// 明确定义标签位置的类型
const tabPosition = ref<TabsInstance['tabPosition']>('top')
</script>

<template>
  <div class="common-layout">
    <el-container>
      <el-header>
        <el-tabs :tab-position="tabPosition" style="height: 200px" type="card">
          <el-tab-pane>
            <template #label>
              <router-link class="button" to="/PointsEventManager">积分管理</router-link>
            </template>
          </el-tab-pane>
          <el-tab-pane>
            <template #label>
              <router-link class="button" to="/PointsLotteryManager">抽奖管理</router-link>
            </template>
          </el-tab-pane>

          <el-tab-pane>
            <template #label>
              <router-link  class="button" to="/PointsExchangeManager">兑换管理</router-link>
            </template>
          </el-tab-pane>
        </el-tabs>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<style scoped>
.button{
  font-size: 16px;
  text-decoration: none;
}
</style>
